package com.tsunami.authority.dto.auth;

import com.tsunami.authority.enums.admin.MoldType;
import com.tsunami.authority.enums.auth.ApplicationType;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import lombok.*;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import java.io.Serializable;

/**
 * @author lx
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
@Builder
@Schema(description = "应用")
public class ApplicationSaveDTO implements Serializable {
    /**
     * 应用名称
     */
    @Schema(description = "应用名称")
    @NotEmpty(message = "应用名称不能为空")
    @Length(max = 30, message = "应用名称长度不能超过30")
    private String name;
    /**
     * 应用编码
     */
    @Schema(description = "应用编码")
    @Length(max = 32, message = "应用编码长度不能超过20")
    private String code;
    /**
     * 应用地址
     */
    @Schema(description = "应用地址")
    private String url;
    /**
     * 应用图标
     */
    @Schema(description = "应用图标")
    private String icon;
    /**
     * 应用状态
     */
    @Schema(description = "应用状态（N正常D删除F禁用）")
    private Boolean status;
    /**
     * 应用描述
     */
    @Schema(description = "应用描述")
    @Length(max = 100, message = "应用描述长度不能超过100")
    private String describe;

    @Schema(description = "是否显示")
    private Boolean display;
    @Schema(description = "应用类型")
    private ApplicationType type;

    @Schema(description = "行业类型")
    private MoldType mold;

    @Schema(description = "排序")
    private Integer sort;

    @Schema(description = "是否基础")
    private Boolean base;
}
